Version

AddRange(Record[],Boolean,Boolean) Method

Selects records contained in passed in records array keeping the existing selected records selected.
Syntax
'Declaration
 
Public Overloads Sub AddRange( _
   ByVal records() As Record, _
   ByVal ensureRecordsOrdered As Boolean, _
   ByVal fireSelectionChangeEvent As Boolean _
) 
public void AddRange( 
   Record[] records,
   bool ensureRecordsOrdered,
   bool fireSelectionChangeEvent
)

Parameters

records
Records to select.
ensureRecordsOrdered
If true then sorts the records in their visible order. For efficiency reason you may want to specify false for this parameter, if for example the order of records in the selected records collection doesn't matter to your logic that accesses and manipulates the selected records collection or you know the records to be in the correct order.
fireSelectionChangeEvent
Specifies whether to fire the DataPresenterBase.SelectedItemsChanging and DataPresenterBase.SelectedItemsChanged events.
Exceptions
ExceptionDescription
System.ArgumentExceptionWhen attempting to select records across different field layouts.
System.InvalidOperationExceptionWhen attempting to select records across different levels.
Remarks

This method can be used to select a range of records. It will keep the existing selected records and select the passed in records.

You can use Record.IsSelected property to select or unselect individual records.

,

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also